package com.whw.fy.service.impl;

import com.whw.fy.entity.Message;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.whw.fy.mapper.ExecutiveConditionMapper;
import com.whw.fy.entity.ExecutiveCondition;
import com.whw.fy.service.ExecutiveConditionService;import java.util.List;

@Service
public class ExecutiveConditionServiceImpl implements ExecutiveConditionService {

    @Resource
    private ExecutiveConditionMapper executiveConditionMapper;

    @Override
    public Message deleteByPrimaryKey(Integer executiveConditionId) {
        return executiveConditionMapper.deleteByPrimaryKey(executiveConditionId) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public Message insert(ExecutiveCondition record) {
        return executiveConditionMapper.insert(record) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public Message insertSelective(ExecutiveCondition record) {
        return executiveConditionMapper.insertSelective(record) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public Message selectByPrimaryKey(Integer executiveConditionId) {
        return Message.success(null).add(executiveConditionMapper.selectByPrimaryKey(executiveConditionId));
    }

    @Override
    public Message updateByPrimaryKeySelective(ExecutiveCondition record) {
        return executiveConditionMapper.updateByPrimaryKeySelective(record) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public Message updateByPrimaryKey(ExecutiveCondition record) {
        return executiveConditionMapper.updateByPrimaryKey(record) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public Message selectAll() {
        return Message.success(null).add(executiveConditionMapper.selectAll());
    }

    @Override
    public int batchInsert(List<ExecutiveCondition> list) {
        return executiveConditionMapper.batchInsert(list);
    }
}



